import os

def change_directory(directory: str):
    if directory:
        os.chdir(directory)
    return {'success': True, 'directory': os.getcwd()}
